const featured = {
  state: () => {
    return {
      title: "",
      content: "",
    };
  },
  mutations: {
    setTitle(state, title) {
      state.title = title;
    },
    setContent(state, content) {
      state.content = content;
    },
  },
  actions: {
    formatContent({ commit }, content) {
      content = content.replace(/<a\s?\S*\s?target="\w*">/g, "");
      content = content.replace(/<\/a>/g, "");
      commit("setContent", content);
    },
  },
  getters: {},
};

export default featured;
